@mixin center($type: 0, $width: 100%, $height: 100%) {
    //   $width: 100% !default;
    @if ($type==1) {
      //   浮动居中
      position: absolute;
      left: 0;
      right: 0;
      margin: auto;
      width: $width;
      height: $height;
    } @else {
      //   margin居中
      margin-left: 0;
      margin-right: 0;
      margin: auto;
      width: $width;
      height: $height;
    }
  }